package com.youan.bean;

public class Customer {
    private String name;

    public Customer() {
        System.err.println("第一步，无参构造执行");
    }

    public Customer(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        System.err.println("第二步，给bean赋值");
        this.name = name;
    }

    @Override
    public String toString() {
        return "Customer{" +
                "name='" + name + '\'' +
                '}';
    }

    public void initBean() {
        System.err.println("第三步，初始化bean");
    }

    public void destroyBean() {
        System.err.println("第五步，销毁bean");
    }
}
